You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on the codebase, Dify’s Swagger/OpenAPI import logic is designed to resolve $ref references in request bodies, but it appears that references in the parameters section (like "$ref": "#/components/parameters/param1") may not be fully dereferenced during import. The relevant parser (ApiBasedToolSchemaParser in parser.py) processes parameters and converts them into tool parameters, but the explicit logic for resolving $ref in parameters is not as robust as for request bodies or schemas. This could explain why your referenced parameter is not being recognized during import, resulting in the error you observed "parser.py".
There are no existing issues or documentation entries addressing this specific problem.
To work around this, try inlining the parameter definition directly in the parameters array instead of using $ref. If you need to use $ref for maintainability, you may need to adjust the import logic in Dify to explicitly resolve parameter references, similar to how it handles $ref in request bodies.
If you continue to encounter issues, providing logs or more details about the import process could help pinpoint where the reference resolution is failing.
Uh oh!
There was an error while loading. Please reload this page.
Self Checks
Dify version
1.4.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Import following swagger file for custom tools:
This is a legal swagger file.
✔️ Expected Behavior
Import success
❌ Actual Behavior
can't find the parameter name because ref is not resolved.
The text was updated successfully, but these errors were encountered: